<!-- sua bai viet-->
<?php echo validation_errors(); ?>

<form method="POST" action="<?php echo base_url().'admin/xuly/users/list/'.$this->uri->segment(5);?>">
<div class="box_heading">
    <div class="icon">
    <img src="<?php echo base_url().'skin/admin/images/icon_settings.png';?>"/> Users( <span style="color: red;"> * : không được để trống</span> )  <?php if(!empty($thongbao)){echo '<img src='.base_url().'skin/admin/images/ok.png class="ok"><font color=red><b>'.$thongbao.'</b></font>';}?>
    </div>
    <div class="right">    
    <a href="<?php echo base_url().'admin/xuly/users/list';?>">Hủy</a>
    </div>
</div>

<div class="box_noidung">
<table class="form">
<tr><td>Họ tên</td><td><input type="text" size="40" value="<?php if(!empty($data)){echo $data->hoten;}else echo '';?>" name="hoten"/></td></tr>
<tr><td><font color=red>* </font>Username</td><td><input type="text" size="40" value="<?php if(!empty($data)){echo $data->username;};?>" name="username"/></td></tr>
<tr><td><font color=red>* </font>Trạng thái</td><td>
                                            <select name="activated">                                            
                                              <option <?php if(!empty($data)){if($data->activated=='1')echo 'selected="selected"';} ?> value='1'>Hoạt động</option>';
                                              <option <?php if(!empty($data)){if($data->activated=='0')echo 'selected="selected"';} ?> value='0'>Khóa</option>';                                              
                                            </select> 
                                            </td></tr>
<tr><td>Email</td><td><input type="text" size="40" value="<?php if(!empty($data)){echo $data->email;}else echo '';?>" name="email"/></td></tr>
<tr><td>Điện thoại</td><td><input type="text" size="40" value="<?php if(!empty($data)){echo $data->phone;}else echo '';?>" name="phone"/></td></tr>
<tr><td>Địa chỉ</td><td><input type="text" size="40" value="<?php if(!empty($data)){echo $data->diachi;}else echo '';?>" name="diachi"/></td></tr>
<tr><td>Mật khẩu mới</td><td><input type="password" size="40" value="" name="new_password_key"/><p>NOTE: Nếu không muốn đổi mật khẩu thì bỏ trống</p></td></tr>
<tr><td style="text-align: center;" colspan="2"><input class="guidulieu" type="submit" value="Lưu"/></td></tr>
</table>
</div>
</form>
    <script type="text/javascript">
           if ( typeof CKEDITOR == 'undefined' )
            {
            	document.write("khong "
            		 ) ;
            }
            else
            {
            	var editor = CKEDITOR.replace( 'soanthao' );            
                CKFinder.setupCKEditor( editor, '<?php echo base_url();?>ckeditor/ckfinder/' ) ;            	
            }
		</script>

<!--end sua bai viet-->